getCostBasisCapGainsTotalForDateRange

Returns a single (complete) CapitalGainResult class/calculation total for all sell transactions for the given security within the given date range. Works for both Average and LOT controlled securities. The asof date is assumed to be today/future. Added February 2024 by Stuart Beesley using the new CostCalculation class since MD2024(5100).

Return

A complete CapitalGainResult containing gains totals for all sell txns within the date range. Values will be in the parent investment account's currency.

Since

MD2024(5100)

Parameters

sec

The security account.

dr

The date range for gains


Returns a single (complete) CapitalGainResult class/calculation total for all sell transactions for the given security within the given date range. Works for both Average and LOT controlled securities. Values will be calculated as of the given asOfDateInt. Added February 2024 by Stuart Beesley using the new CostCalculation class since MD2024(5100).

Return

A complete CapitalGainResult containing gains totals for all sell txns within the date range. Values will be in the parent investment account's currency.

Since

MD2024(5100)

Parameters

sec

The security account.

dr

The date range for gains

asOfDateInt

The asof date for the cost basis calculation